home *** CD-ROM | disk | FTP | other *** search
/ AmigActive 10 / AACD 10.iso / AACD / Games / MAME / src / drivers / spacefb.c < prev    next >
C/C++ Source or Header  |  2000-04-04  |  18KB  |  554 lines

  1. /***************************************************************************
  2.  
  3. Space Firebird memory map (preliminary)
  4.  
  5.   Memory Map figured out by Chris Hardy (chrish@kcbbs.gen.nz), Paul Johnson and Andy Clark
  6.   MAME driver by Chris Hardy
  7.  
  8.   Schematics scanned and provided by James Twine
  9.   Thanks to Gary Walton for lending me his REAL Space Firebird
  10.  
  11.   The way the sprites are drawn ARE correct. They are identical to the real
  12.   pcb.
  13.  
  14. TODO
  15.     - Add "Red" flash when you die.
  16.     - Add Starfield. It is NOT a Galaxians starfield
  17.     -
  18.  
  19. 0000-3FFF ROM        Code
  20. 8000-83FF RAM        Sprite RAM
  21. C000-C7FF RAM        Game ram
  22.  
  23. IO Ports
  24.  
  25. IN:
  26. Port 0 - Player 1 I/O
  27. Port 1 - Player 2 I/O
  28. Port 2 - P1/P2 Start Test and Service
  29. Port 3 - Dipswitch
  30.  
  31.  
  32. OUT:
  33. Port 0 - RV,VREF and CREF
  34. Port 1 - Comms to the Sound card (-> 8212)
  35.     bit 0 = discrete sound
  36.     bit 1 = INT to 8035
  37.     bit 2 = T1 input to 8035
  38.     bit 3 = PB4 input to 8035
  39.     bit 4 = PB5 input to 8035
  40.     bit 5 = T0 input to 8035
  41.     bit 6 = discrete sound
  42.     bit 7 = discrete sound
  43.  
  44. Port 2 - Video contrast values (used by sound board only)
  45. Port 3 - Unused
  46.  
  47.  
  48. IN:
  49. Port 0
  50.  
  51.    bit 0 = Player 1 Right
  52.    bit 1 = Player 1 Left
  53.    bit 2 = unused
  54.    bit 3 = unused
  55.    bit 4 = Player 1 Escape
  56.    bit 5 = unused
  57.    bit 6 = unused
  58.    bit 7 = Player 1 Fire
  59.  
  60. Port 1
  61.  
  62.    bit 0 = Player 2 Right
  63.    bit 1 = Player 2 Left
  64.    bit 2 = unused
  65.    bit 3 = unused
  66.    bit 4 = Player 2 Escape
  67.    bit 5 = unused
  68.    bit 6 = unused
  69.    bit 7 = Player 2 Fire
  70.  
  71. Port 2
  72.  
  73.    bit 0 = unused
  74.    bit 1 = unused
  75.    bit 2 = Start 1 Player game
  76.    bit 3 = Start 2 Players game
  77.    bit 4 = unused
  78.    bit 5 = unused
  79.    bit 6 = Test switch
  80.    bit 7 = Coin and Service switch
  81.  
  82. Port 3
  83.  
  84.    bit 0 = Dipswitch 1
  85.    bit 1 = Dipswitch 2
  86.    bit 2 = Dipswitch 3
  87.    bit 3 = Dipswitch 4
  88.    bit 4 = Dipswitch 5
  89.    bit 5 = Dipswitch 6
  90.    bit 6 = unused (Debug switch - Code jumps to $3800 on reset if on)
  91.    bit 7 = unused
  92.  
  93. OUT:
  94. Port 0 - Video
  95.  
  96.    bit 0 = Screen flip. (RV)
  97.    bit 1 = unused
  98.    bit 2 = unused
  99.    bit 3 = unused
  100.    bit 4 = unused
  101.    bit 5 = Char/Sprite Bank switch (VREF)
  102.    bit 6 = Turns on Bit 2 of the color PROM. Used to change the bird colors. (CREF)
  103.    bit 7 = unused
  104.  
  105. Port 1
  106.     8 bits gets "sent" to a 8212 chip
  107.  
  108. Port 2 - Video control
  109.  
  110. These are passed to the sound board and are used to produce a
  111. red flash effect when you die.
  112.  
  113.    bit 0 = CONT R
  114.    bit 1 = CONT G
  115.    bit 2 = CONT B
  116.    bit 3 = ALRD
  117.    bit 4 = ALBU
  118.    bit 5 = unused
  119.    bit 6 = unused
  120.    bit 7 = ALBA
  121.  
  122.  
  123. ***************************************************************************/
  124.  
  125. #include "driver.h"
  126. #include "vidhrdw/generic.h"
  127. #include "cpu/i8039/i8039.h"
  128.  
  129.  
  130. void spacefb_vh_screenrefresh(struct osd_bitmap *bitmap,int full_refresh);
  131. void spacefb_vh_convert_color_prom(unsigned char *palette, unsigned short *colortable,const unsigned char *color_prom);
  132.  
  133. WRITE_HANDLER( spacefb_video_control_w );
  134. WRITE_HANDLER( spacefb_port_2_w );
  135.  
  136.  
  137. static int spacefb_interrupt(void)
  138. {
  139.     if (cpu_getiloops() != 0) return (0x00cf);        /* RST 08h */
  140.     else return (0x00d7);        /* RST 10h */
  141. }
  142.  
  143.  
  144. unsigned char spacefb_sound_latch;
  145.  
  146. static READ_HANDLER( spacefb_sh_p2_r )
  147. {
  148.     return ((spacefb_sound_latch & 0x18) << 1);
  149. }
  150.  
  151. static READ_HANDLER( spacefb_sh_t0_r )
  152. {
  153.     return spacefb_sound_latch & 0x20;
  154. }
  155.  
  156. static READ_HANDLER( spacefb_sh_t1_r )
  157. {
  158.     return spacefb_sound_latch & 0x04;
  159. }
  160.  
  161. static WRITE_HANDLER( spacefb_port_1_w )
  162. {
  163.     spacefb_sound_latch = data;
  164.     if (!(data & 0x02)) cpu_cause_interrupt(1,I8039_EXT_INT);
  165. }
  166.  
  167.  
  168. static struct MemoryReadAddress readmem[] =
  169. {
  170.     { 0x0000, 0x3fff, MRA_ROM },
  171.     { 0x8000, 0x83ff, MRA_RAM },
  172.     { 0xc000, 0xc7ff, MRA_RAM },
  173.     { -1 }    /* end of table */
  174. };
  175.  
  176. static struct MemoryWriteAddress writemem[] =
  177. {
  178.     { 0x0000, 0x3fff, MWA_ROM },
  179.     { 0x8000, 0x83ff, MWA_RAM, &videoram, &videoram_size },
  180.     { 0xc000, 0xc7ff, MWA_RAM },
  181.     { -1 }    /* end of table */
  182. };
  183.  
  184. static struct IOReadPort readport[] =
  185. {
  186.     { 0x00, 0x00, input_port_0_r }, /* IN 0 */
  187.     { 0x01, 0x01, input_port_1_r }, /* IN 1 */
  188.     { 0x02, 0x02, input_port_2_r }, /* Coin - Start */
  189.     { 0x03, 0x03, input_port_3_r }, /* DSW0 */
  190.     { -1 }    /* end of table */
  191. };
  192.  
  193. static struct IOWritePort writeport[] =
  194. {
  195.     { 0x00, 0x00, spacefb_video_control_w },
  196.     { 0x01, 0x01, spacefb_port_1_w },
  197.     { 0x02, 0x02, spacefb_port_2_w },
  198.     { -1 }    /* end of table */
  199. };
  200.  
  201. static struct MemoryReadAddress readmem_sound[] =
  202. {
  203.     { 0x0000, 0x03ff, MRA_ROM },
  204.     { -1 }    /* end of table */
  205. };
  206.  
  207. static struct MemoryWriteAddress writemem_sound[] =
  208. {
  209.     { 0x0000, 0x03ff, MWA_ROM },
  210.     { -1 }    /* end of table */
  211. };
  212.  
  213. static struct IOReadPort readport_sound[] =
  214. {
  215.     { I8039_p2, I8039_p2, spacefb_sh_p2_r },
  216.     { I8039_t0, I8039_t0, spacefb_sh_t0_r },
  217.     { I8039_t1, I8039_t1, spacefb_sh_t1_r },
  218.     { -1 }    /* end of table */
  219. };
  220.  
  221. static struct IOWritePort writeport_sound[] =
  222. {
  223.     { I8039_p1, I8039_p1, DAC_0_data_w },
  224.     { -1 }    /* end of table */
  225. };
  226.  
  227.  
  228. INPUT_PORTS_START( spacefb )
  229.     PORT_START      /* IN0 */
  230.     PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_JOYSTICK_RIGHT | IPF_2WAY )
  231.     PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_JOYSTICK_LEFT | IPF_2WAY )
  232.     PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_UNKNOWN )
  233.     PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_UNKNOWN )
  234.     PORT_BIT( 0x10, IP_ACTIVE_HIGH, IPT_BUTTON2 )
  235.     PORT_BIT( 0x20, IP_ACTIVE_HIGH, IPT_UNKNOWN )
  236.     PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_UNKNOWN )
  237.     PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_BUTTON1 )
  238.  
  239.     PORT_START      /* IN1 */
  240.     PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_JOYSTICK_RIGHT | IPF_2WAY | IPF_COCKTAIL )
  241.     PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_JOYSTICK_LEFT | IPF_2WAY | IPF_COCKTAIL )
  242.     PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_UNKNOWN )
  243.     PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_UNKNOWN )
  244.     PORT_BIT( 0x10, IP_ACTIVE_HIGH, IPT_BUTTON2 | IPF_COCKTAIL )
  245.     PORT_BIT( 0x20, IP_ACTIVE_HIGH, IPT_UNKNOWN )
  246.     PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_UNKNOWN )
  247.     PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_BUTTON1 | IPF_COCKTAIL )
  248.  
  249.     PORT_START      /* Coin - Start */
  250.     PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_UNKNOWN )
  251.     PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_UNKNOWN )
  252.     PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_START1 )
  253.     PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_START2 )
  254.     PORT_BIT( 0x10, IP_ACTIVE_HIGH, IPT_UNKNOWN )
  255.     PORT_BIT( 0x20, IP_ACTIVE_HIGH, IPT_UNKNOWN )
  256.     PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_UNKNOWN ) /* Test ? */
  257.     PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_COIN1 )
  258.  
  259.     PORT_START      /* DSW0 */
  260.     PORT_DIPNAME( 0x03, 0x00, DEF_STR( Lives ) )
  261.     PORT_DIPSETTING(    0x00, "3" )
  262.     PORT_DIPSETTING(    0x01, "4" )
  263.     PORT_DIPSETTING(    0x02, "5" )
  264.     PORT_DIPSETTING(    0x03, "6" )
  265.     PORT_DIPNAME( 0x0c, 0x00, DEF_STR( Coinage ) )
  266.     PORT_DIPSETTING(    0x04, DEF_STR( 2C_1C ) )
  267.     PORT_DIPSETTING(    0x00, DEF_STR( 1C_1C ) )
  268.     PORT_DIPSETTING(    0x0c, DEF_STR( 1C_2C ) )
  269.     PORT_DIPSETTING(    0x08, DEF_STR( 1C_3C ) )
  270.     PORT_DIPNAME( 0x10, 0x00, DEF_STR( Bonus_Life ) )
  271.     PORT_DIPSETTING(    0x00, "5000" )
  272.     PORT_DIPSETTING(    0x10, "8000" )
  273.     PORT_DIPNAME( 0x20, 0x20, DEF_STR( Cabinet ) )
  274.     PORT_DIPSETTING(    0x20, DEF_STR( Upright ) )
  275.     PORT_DIPSETTING(    0x00, DEF_STR( Cocktail ) )
  276.     PORT_BIT( 0xc0, IP_ACTIVE_HIGH, IPT_UNKNOWN )
  277. INPUT_PORTS_END
  278.  
  279.  
  280. /* Same as Space Firebird, except for the difficulty switch */
  281. INPUT_PORTS_START( spacedem )
  282.     PORT_START      /* IN0 */
  283.     PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_JOYSTICK_RIGHT | IPF_2WAY )
  284.     PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_JOYSTICK_LEFT | IPF_2WAY )
  285.     PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_UNKNOWN )
  286.     PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_UNKNOWN )
  287.     PORT_BIT( 0x10, IP_ACTIVE_HIGH, IPT_BUTTON2 )
  288.     PORT_BIT( 0x20, IP_ACTIVE_HIGH, IPT_UNKNOWN )
  289.     PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_UNKNOWN )
  290.     PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_BUTTON1 )
  291.  
  292.     PORT_START      /* IN1 */
  293.     PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_JOYSTICK_RIGHT | IPF_2WAY | IPF_COCKTAIL )
  294.     PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_JOYSTICK_LEFT | IPF_2WAY | IPF_COCKTAIL )
  295.     PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_UNKNOWN )
  296.     PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_UNKNOWN )
  297.     PORT_BIT( 0x10, IP_ACTIVE_HIGH, IPT_BUTTON2 | IPF_COCKTAIL )
  298.     PORT_BIT( 0x20, IP_ACTIVE_HIGH, IPT_UNKNOWN )
  299.     PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_UNKNOWN )
  300.     PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_BUTTON1 | IPF_COCKTAIL )
  301.  
  302.     PORT_START      /* Coin - Start */
  303.     PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_UNKNOWN )
  304.     PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_UNKNOWN )
  305.     PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_START1 )
  306.     PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_START2 )
  307.     PORT_BIT( 0x10, IP_ACTIVE_HIGH, IPT_UNKNOWN )
  308.     PORT_BIT( 0x20, IP_ACTIVE_HIGH, IPT_UNKNOWN )
  309.     PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_UNKNOWN ) /* Test ? */
  310.     PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_COIN1 )
  311.  
  312.     PORT_START      /* DSW0 */
  313.     PORT_DIPNAME( 0x01, 0x00, DEF_STR( Lives ) )
  314.     PORT_DIPSETTING(    0x00, "3" )
  315.     PORT_DIPSETTING(    0x01, "4" )
  316.     PORT_DIPNAME( 0x02, 0x00, DEF_STR( Difficulty ) )
  317.     PORT_DIPSETTING(    0x00, "Easy" )
  318.     PORT_DIPSETTING(    0x01, "Hard" )
  319.     PORT_DIPNAME( 0x0c, 0x00, DEF_STR( Coinage ) )
  320.     PORT_DIPSETTING(    0x04, DEF_STR( 2C_1C ) )
  321.     PORT_DIPSETTING(    0x00, DEF_STR( 1C_1C ) )
  322.     PORT_DIPSETTING(    0x0c, DEF_STR( 1C_2C ) )
  323.     PORT_DIPSETTING(    0x08, DEF_STR( 1C_3C ) )
  324.     PORT_DIPNAME( 0x10, 0x00, DEF_STR( Bonus_Life ) )
  325.     PORT_DIPSETTING(    0x00, "5000" )
  326.     PORT_DIPSETTING(    0x10, "8000" )
  327.     PORT_DIPNAME( 0x20, 0x20, DEF_STR( Cabinet ) )
  328.     PORT_DIPSETTING(    0x20, DEF_STR( Upright ) )
  329.     PORT_DIPSETTING(    0x00, DEF_STR( Cocktail ) )
  330.     PORT_BIT( 0xc0, IP_ACTIVE_HIGH, IPT_UNKNOWN )
  331. INPUT_PORTS_END
  332.  
  333.  
  334.  
  335. static struct GfxLayout spritelayout =
  336. {
  337.     8,8,    /* 8*8 characters */
  338.     256,    /* 256 characters */
  339.     2,    /* 2 bits per pixel */
  340.     { 0, 256*8*8 },    /* the two bitplanes are separated */
  341.     { 0, 1, 2, 3, 4, 5, 6, 7 },
  342.     { 0*8, 1*8, 2*8, 3*8, 4*8, 5*8, 6*8, 7*8 },
  343.     8*8    /* every char takes 8 consecutive bytes */
  344. };
  345. /*
  346.  * The bullests are stored in a 256x4bit PROM but the .bin file is
  347.  * 256*8bit
  348.  */
  349.  
  350. static struct GfxLayout bulletlayout =
  351. {
  352.     4,4,    /* 4*4 characters */
  353.     64,        /* 64 characters */
  354.     1,        /* 1 bits per pixel */
  355.     { 0 },
  356.     { 4, 5, 6, 7 },
  357.     { 0*8, 1*8, 2*8, 3*8 },
  358.     4*8    /* every char takes 4 consecutive bytes */
  359. };
  360.  
  361. static struct GfxDecodeInfo gfxdecodeinfo[] =
  362. {
  363.     { REGION_GFX1, 0, &spritelayout, 0, 8 },
  364.     { REGION_GFX2, 0, &bulletlayout, 0, 8 },
  365.     { -1 } /* end of array */
  366. };
  367.  
  368.  
  369. static struct DACinterface dac_interface =
  370. {
  371.     1,
  372.     { 100 }
  373. };
  374.  
  375. static struct MachineDriver machine_driver_spacefb =
  376. {
  377.     /* basic machine hardware */
  378.     {
  379.         {
  380.             CPU_Z80,
  381.             4000000,    /* 4 Mhz? */
  382.             readmem,writemem,readport,writeport,
  383.             spacefb_interrupt,2 /* two int's per frame */
  384.         },
  385.         {
  386.             CPU_I8035 | CPU_AUDIO_CPU,
  387.             6000000/15,
  388.             readmem_sound,writemem_sound,readport_sound,writeport_sound,
  389.             ignore_interrupt,0
  390.         }
  391.     },
  392.     60, DEFAULT_60HZ_VBLANK_DURATION,    /* frames per second, vblank duration */
  393.     3,
  394.     0,
  395.  
  396.     /* video hardware */
  397.     /* there is no real character graphics, only 8*8 and 4*4 sprites */
  398.       264, 256, { 0, 263, 16, 247 },
  399.     gfxdecodeinfo,
  400.  
  401.     32,32,
  402.     spacefb_vh_convert_color_prom,
  403.  
  404.     VIDEO_TYPE_RASTER|VIDEO_SUPPORTS_DIRTY,
  405.     0,
  406.     generic_vh_start,
  407.     generic_vh_stop,
  408.     spacefb_vh_screenrefresh,
  409.  
  410.     /* sound hardware */
  411.     0,0,0,0,
  412.     {
  413.         {
  414.             SOUND_DAC,
  415.             &dac_interface
  416.         }
  417.     }
  418. };
  419.  
  420.  
  421.  
  422. ROM_START( spacefb )
  423.     ROM_REGION( 0x10000, REGION_CPU1 )    /* 64k for code */
  424.     ROM_LOAD( "5e.cpu",       0x0000, 0x0800, 0x2d406678 )         /* Code */
  425.     ROM_LOAD( "5f.cpu",       0x0800, 0x0800, 0x89f0c34a )
  426.     ROM_LOAD( "5h.cpu",       0x1000, 0x0800, 0xc4bcac3e )
  427.     ROM_LOAD( "5i.cpu",       0x1800, 0x0800, 0x61c00a65 )
  428.     ROM_LOAD( "5j.cpu",       0x2000, 0x0800, 0x598420b9 )
  429.     ROM_LOAD( "5k.cpu",       0x2800, 0x0800, 0x1713300c )
  430.     ROM_LOAD( "5m.cpu",       0x3000, 0x0800, 0x6286f534 )
  431.     ROM_LOAD( "5n.cpu",       0x3800, 0x0800, 0x1c9f91ee )
  432.  
  433.     ROM_REGION( 0x1000, REGION_CPU2 )    /* sound */
  434.     ROM_LOAD( "ic20.snd",     0x0000, 0x0400, 0x1c8670b3 )
  435.  
  436.     ROM_REGION( 0x1000, REGION_GFX1 | REGIONFLAG_DISPOSE )
  437.     ROM_LOAD( "5k.vid",       0x0000, 0x0800, 0x236e1ff7 )
  438.     ROM_LOAD( "6k.vid",       0x0800, 0x0800, 0xbf901a4e )
  439.  
  440.     ROM_REGION( 0x0100, REGION_GFX2 | REGIONFLAG_DISPOSE )
  441.     ROM_LOAD( "4i.vid",       0x0000, 0x0100, 0x528e8533 )
  442.  
  443.     ROM_REGION( 0x0020, REGION_PROMS )
  444.     ROM_LOAD( "mb7051.3n",    0x0000, 0x0020, 0x465d07af )
  445. ROM_END
  446.  
  447. ROM_START( spacefbg )
  448.     ROM_REGION( 0x10000, REGION_CPU1 )    /* 64k for code */
  449.     ROM_LOAD( "tst-c.5e",     0x0000, 0x0800, 0x07949110 )         /* Code */
  450.     ROM_LOAD( "tst-c.5f",     0x0800, 0x0800, 0xce591929 )
  451.     ROM_LOAD( "tst-c.5h",     0x1000, 0x0800, 0x55d34ea5 )
  452.     ROM_LOAD( "tst-c.5i",     0x1800, 0x0800, 0xa11e2881 )
  453.     ROM_LOAD( "tst-c.5j",     0x2000, 0x0800, 0xa6aff352 )
  454.     ROM_LOAD( "tst-c.5k",     0x2800, 0x0800, 0xf4213603 )
  455.     ROM_LOAD( "5m.cpu",       0x3000, 0x0800, 0x6286f534 )
  456.     ROM_LOAD( "5n.cpu",       0x3800, 0x0800, 0x1c9f91ee )
  457.  
  458.     ROM_REGION( 0x1000, REGION_CPU2 )    /* sound */
  459.     ROM_LOAD( "ic20.snd",     0x0000, 0x0400, 0x1c8670b3 )
  460.  
  461.     ROM_REGION( 0x1000, REGION_GFX1 | REGIONFLAG_DISPOSE )
  462.     ROM_LOAD( "tst-v.5k",     0x0000, 0x0800, 0xbacc780d )
  463.     ROM_LOAD( "tst-v.6k",     0x0800, 0x0800, 0x1645ff26 )
  464.  
  465.     ROM_REGION( 0x0100, REGION_GFX2 | REGIONFLAG_DISPOSE )
  466.     ROM_LOAD( "4i.vid",       0x0000, 0x0100, 0x528e8533 )
  467.  
  468.     ROM_REGION( 0x0020, REGION_PROMS )
  469.     ROM_LOAD( "mb7051.3n",    0x0000, 0x0020, 0x465d07af )
  470. ROM_END
  471.  
  472. ROM_START( spacebrd )
  473.     ROM_REGION( 0x10000, REGION_CPU1 )    /* 64k for code */
  474.     ROM_LOAD( "sb5e.cpu",     0x0000, 0x0800, 0x232d66b8 )         /* Code */
  475.     ROM_LOAD( "sb5f.cpu",     0x0800, 0x0800, 0x99504327 )
  476.     ROM_LOAD( "sb5h.cpu",     0x1000, 0x0800, 0x49a26fe5 )
  477.     ROM_LOAD( "sb5i.cpu",     0x1800, 0x0800, 0xc23025da )
  478.     ROM_LOAD( "sb5j.cpu",     0x2000, 0x0800, 0x5e97baf0 )
  479.     ROM_LOAD( "5k.cpu",       0x2800, 0x0800, 0x1713300c )
  480.     ROM_LOAD( "sb5m.cpu",     0x3000, 0x0800, 0x4cbe92fc )
  481.     ROM_LOAD( "sb5n.cpu",     0x3800, 0x0800, 0x1a798fbf )
  482.  
  483.     ROM_REGION( 0x1000, REGION_CPU2 )    /* sound */
  484.     ROM_LOAD( "ic20.snd",     0x0000, 0x0400, 0x1c8670b3 )
  485.  
  486.     ROM_REGION( 0x1000, REGION_GFX1 | REGIONFLAG_DISPOSE )
  487.     ROM_LOAD( "5k.vid",       0x0000, 0x0800, 0x236e1ff7 )
  488.     ROM_LOAD( "6k.vid",       0x0800, 0x0800, 0xbf901a4e )
  489.  
  490.     ROM_REGION( 0x0100, REGION_GFX2 | REGIONFLAG_DISPOSE )
  491.     ROM_LOAD( "4i.vid",       0x0000, 0x0100, 0x528e8533 )
  492.  
  493.     ROM_REGION( 0x0020, REGION_PROMS )
  494.     ROM_LOAD( "spcbird.clr",  0x0000, 0x0020, 0x25c79518 )
  495. ROM_END
  496.  
  497. /* only a few bytes are different between this and spacebrd above */
  498. ROM_START( spacefbb )
  499.     ROM_REGION( 0x10000, REGION_CPU1 )    /* 64k for code */
  500.     ROM_LOAD( "fc51",         0x0000, 0x0800, 0x5657bd2f )         /* Code */
  501.     ROM_LOAD( "fc52",         0x0800, 0x0800, 0x303b0294 )
  502.     ROM_LOAD( "sb5h.cpu",     0x1000, 0x0800, 0x49a26fe5 )
  503.     ROM_LOAD( "sb5i.cpu",     0x1800, 0x0800, 0xc23025da )
  504.     ROM_LOAD( "fc55",         0x2000, 0x0800, 0x946bee5d )
  505.     ROM_LOAD( "5k.cpu",       0x2800, 0x0800, 0x1713300c )
  506.     ROM_LOAD( "sb5m.cpu",     0x3000, 0x0800, 0x4cbe92fc )
  507.     ROM_LOAD( "sb5n.cpu",     0x3800, 0x0800, 0x1a798fbf )
  508.  
  509.     ROM_REGION( 0x1000, REGION_CPU2 )    /* sound */
  510.     ROM_LOAD( "fb.snd",       0x0000, 0x0400, 0xf7a59492 )
  511.  
  512.     ROM_REGION( 0x1000, REGION_GFX1 | REGIONFLAG_DISPOSE )
  513.     ROM_LOAD( "fc59",         0x0000, 0x0800, 0xa00ad16c )
  514.     ROM_LOAD( "6k.vid",       0x0800, 0x0800, 0xbf901a4e )
  515.  
  516.     ROM_REGION( 0x0100, REGION_GFX2 | REGIONFLAG_DISPOSE )
  517.     ROM_LOAD( "4i.vid",       0x0000, 0x0100, 0x528e8533 )
  518.  
  519.     ROM_REGION( 0x0020, REGION_PROMS )
  520.     ROM_LOAD( "mb7051.3n",    0x0000, 0x0020, 0x465d07af )
  521. ROM_END
  522.  
  523. ROM_START( spacedem )
  524.     ROM_REGION( 0x10000, REGION_CPU1 )    /* 64k for code */
  525.     ROM_LOAD( "sd5e.cpu",     0x0000, 0x0800, 0xbe4b9cbb )         /* Code */
  526.     ROM_LOAD( "sd5f.cpu",     0x0800, 0x0800, 0x0814f964 )
  527.     ROM_LOAD( "sd5h.cpu",     0x1000, 0x0800, 0xebfff682 )
  528.     ROM_LOAD( "sd5i.cpu",     0x1800, 0x0800, 0xdd7e1378 )
  529.     ROM_LOAD( "sd5j.cpu",     0x2000, 0x0800, 0x98334fda )
  530.     ROM_LOAD( "sd5k.cpu",     0x2800, 0x0800, 0xba4933b2 )
  531.     ROM_LOAD( "sd5m.cpu",     0x3000, 0x0800, 0x14d3c656 )
  532.     ROM_LOAD( "sd5n.cpu",     0x3800, 0x0800, 0x7e0e41b0 )
  533.  
  534.     ROM_REGION( 0x1000, REGION_CPU2 )    /* sound */
  535.     ROM_LOAD( "ic20.snd",     0x0000, 0x0400, 0x00000000 )  /* This ROM wasn't in the set. Using Space Firebird's */
  536.  
  537.     ROM_REGION( 0x1000, REGION_GFX1 | REGIONFLAG_DISPOSE )
  538.     ROM_LOAD( "sd5k.vid",     0x0000, 0x0800, 0x55758e4d )
  539.     ROM_LOAD( "sd6k.vid",     0x0800, 0x0800, 0x3fcbb20c )
  540.  
  541.     ROM_REGION( 0x0100, REGION_GFX2 | REGIONFLAG_DISPOSE )
  542.     ROM_LOAD( "4i.vid",       0x0000, 0x0100, 0x00000000 )  /* This ROM wasn't in the set. Using Space Firebird's */
  543.  
  544.     ROM_REGION( 0x0020, REGION_PROMS )
  545.     ROM_LOAD( "mb7051.3n",    0x0000, 0x0020, 0x00000000 )  /* This ROM wasn't in the set. Using Space Firebird's */
  546. ROM_END
  547.  
  548.  
  549. GAMEX( 1980, spacefb,  0,       spacefb, spacefb,  0, ROT90, "Nintendo", "Space Firebird (Nintendo)", GAME_IMPERFECT_COLORS | GAME_IMPERFECT_SOUND )
  550. GAMEX( 1980, spacefbg, spacefb, spacefb, spacefb,  0, ROT90, "Gremlin", "Space Firebird (Gremlin)", GAME_IMPERFECT_COLORS | GAME_IMPERFECT_SOUND )
  551. GAMEX( 1980, spacebrd, spacefb, spacefb, spacefb,  0, ROT90, "bootleg", "Space Bird (bootleg)", GAME_IMPERFECT_COLORS | GAME_IMPERFECT_SOUND )
  552. GAMEX( 1980, spacefbb, spacefb, spacefb, spacefb,  0, ROT90, "bootleg", "Space Firebird (bootleg)", GAME_IMPERFECT_COLORS | GAME_IMPERFECT_SOUND )
  553. GAMEX( 1980, spacedem, spacefb, spacefb, spacedem, 0, ROT90, "Nintendo / Fortrek", "Space Demon", GAME_IMPERFECT_COLORS | GAME_IMPERFECT_SOUND )
  554.